/*!
 * OurJS
 *  sundongguo
 *  http://s79.github.com/OurJS/
 *  2014-01-26
 *  Released under the MIT License.
 */
(function(h) {
  String.prototype.repeat = function(n) {
    n = Number.toInteger(n);
    var m = "";
    while (n--) {
      m += this
    }
    return m
  };
  String.prototype.startsWith = function(m) {
    return this.indexOf(m) === 0
  };
  String.prototype.endsWith = function(m) {
    var n = this.lastIndexOf(m);
    return n >= 0 && n === this.length - m.length
  };
  String.prototype.contains = function(m) {
    return this.indexOf(m) !== -1
  };
  String.prototype.toArray = function() {
    return this.split("")
  };
  Number.isFinite = function(m) {
    return typeof m === "number" && isFinite(m)
  };
  Number.isNaN = function(m) {
    return typeof m === "number" && isNaN(m)
  };
  Number.isInteger = function(m) {
    return Number.isFinite(m) && Math.floor(m) === m && m > -9007199254740992 && m < 9007199254740992
  };
  Number.toInteger = function(m) {
    m = +m || 0;
    m = Math[m < 0 ? "ceil" : "floor"](m);
    return m
  };
  var g = /(-|_)+/g;
  var b = /[^A-Z\s]([A-Z])|[A-Z][^A-Z\s]/g;
  var e = function(m) {
    return m.replace(g, " ").replace(b, function(o, n) {
      return n ? o.charAt(0) + " " + o.charAt(1) : " " + o
    }).clean().split(" ")
  };
  var d = /YYYY|MM|DD|hh|mm|ss|s|TZD/g;
  var f = {};
  ["Boolean", "Number", "String", "Array", "Date", "RegExp", "Error", "Math", "JSON", "Arguments"].forEach(function(m) {
    f["[object " + m + "]"] = "object." + m
  });
  var c = Object.prototype.toString;
  var k = /^\s+function .+\s+\[native code\]\s+\}\s+$/;
  h.typeOf = function(o) {
    var n = typeof o;
    if (n === "function" && typeof o.item === "function") {
      n = "object.Collection"
    } else {
      if (n === "object") {
        if (o === null) {
          n = "null"
        } else {
          n = f[c.call(o)] || "object.Object";
          if (n === "object.Object") {
            var m = String(o);
            if (m === "[object Window]" || m === "[object DOMWindow]") {
              n = "object.Global"
            } else {
              if (m === "[object JSON]") {
                n = "object.JSON"
              } else {
                if (k.test(m)) {
                  n = "function"
                } else {
                  if ("nodeType" in o) {
                    n = "object.Node"
                  } else {
                    if (typeof o.length === "number") {
                      if ("navigator" in o) {
                        n = "object.Global"
                      } else {
                        if ("item" in o) {
                          n = "object.Collection"
                        } else {
                          if ("callee" in o) {
                            n = "object.Arguments"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    return n
  };
  Object.forEach = function(n, o, m) {
    Object.keys(n).forEach(function(p) {
      o.call(m, n[p], p, n)
    })
  };
  Object.clone = function(n, p) {
    var o;
    var m = typeOf(n);
    switch (m) {
      case"undefined":
      case"boolean":
      case"number":
      case"string":
      case"null":
        o = n;
        break;
      case"object.Boolean":
      case"object.Number":
      case"object.String":
      case"object.Date":
      case"object.RegExp":
        o = new n.constructor(n.valueOf());
      case"object.Array":
        if (!o) {
          o = []
        }
      case"object.Object":
        if (!o) {
          o = {}
        }
        Object.forEach(n, function(r, q) {
          o[q] = p ? Object.clone(r, true) : r
        });
        break;
      default:
        throw new TypeError("Object.clone called on no-cloning type: " + m)
    }
    return o
  };
  Object.mixin = function(r, n, p) {
    var q = Object.keys(n);
    if (p) {
      var o = p.whiteList;
      var m = p.blackList;
      if (o) {
        q = q.filter(function(s) {
          return o.contains(s)
        })
      }
      if (m) {
        q = q.filter(function(s) {
          return !m.contains(s)
        })
      }
    }
    q.forEach(function(s) {
      r[s] = n[s]
    });
    return r
  };
  Object.toQueryString = function(n, p) {
    var m = [];
    var o = function(q, r) {
      if (r != null) {
        m.push(p ? q + "=" + r : encodeURIComponent(q) + "=" + encodeURIComponent(r))
      }
    };
    Object.forEach(n, function(r, q) {
      if (Array.isArray(r)) {
        r.forEach(function(s) {
          o(q, s)
        })
      } else {
        o(q, r)
      }
    });
    return m.join("&")
  };
  Object.fromQueryString = function(o, m) {
    var n = {};
    o.split("&").forEach(function(r) {
      var p = r.split("=");
      var q = p[0];
      var s = p[1];
      if (s !== undefined) {
        if (!m) {
          q = decodeURIComponent(q);
          s = decodeURIComponent(s)
        }
        if (n.hasOwnProperty(q)) {
          typeof n[q] === "string" ? n[q] = [n[q], s] : n[q].push(s)
        } else {
          n[q] = s
        }
      }
    });
    return n
  };
  Array.from = function(p) {
    if (p == null) {
      return[]
    }
    if (Array.isArray(p)) {
      return p
    }
    if (typeof p.toArray === "function") {
      return p.toArray()
    }
    switch (typeOf(p)) {
      case"object.Arguments":
      case"object.Collection":
      case"object.Object":
        var n = 0;
        var o = p.length;
        if (typeof o === "number") {
          var m = [];
          while (n < o) {
            if (!p.hasOwnProperty || p.hasOwnProperty(n)) {
              m[n] = p[n]
            }
            n++
          }
          m.length = o;
          return m
        }
    }
    return[p]
  };
  Array.prototype.shuffle = function() {
    var n = this.length;
    var o;
    var m;
    if (n > 1) {
      while (--n) {
        o = Math.floor(Math.random() * (n + 1));
        m = this[n];
        this[n] = this[o];
        this[o] = m
      }
    }
    return this
  };
  Array.prototype.contains = function(m) {
    return this.indexOf(m) !== -1
  };
  Array.prototype.remove = function(n) {
    var m = this.indexOf(n);
    if (m > -1) {
      this.splice(m, 1);
      return true
    }
    return false
  };
  Array.prototype.getFirst = function() {
    return this[0]
  };
  Array.prototype.getLast = function() {
    return this[this.length - 1]
  };
  var l = /[\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g;
  String.prototype.clean = function() {
    return this.replace(l, " ").trim()
  };
  String.prototype.camelize = function(m) {
    return e(this).map(function(o, n) {
      return(n || m) ? o.slice(0, 1).toUpperCase() + o.slice(1).toLowerCase() : o.toLowerCase()
    }).join("")
  };
  String.prototype.dasherize = function() {
    return e(this).join("-").toLowerCase()
  };
  Number.prototype.padZero = function(p) {
    var m = (this < 0) ? "-" : "";
    var o = String(Math.abs(this));
    if (isFinite(this)) {
      var n = o.length - (Math.ceil(this) == this ? 0 : 1);
      if (n < p) {
        o = "0".repeat(p - n) + o
      }
    }
    return m + o
  };
  Math.limit = function(o, n, m) {
    return Number.isFinite(o) ? Math.min(m, Math.max(n, o)) : (o === Infinity ? m : n)
  };
  Math.randomRange = function(n, m) {
    return Math.floor(Math.random() * (m - n + 1) + n)
  };
  var a = new Date();
  var i = a.getTimezoneOffset() * 60000;
  Date.parseExact = function(r, u, o) {
    u = u || "YYYY-MM-DD";
    var p = {};
    var q;
    var s;
    var w;
    var v;
    var n;
    var x;
    var t = 0;
    while (q = d.exec(u)) {
      w = q[0];
      s = q.index;
      n = s + t;
      if (w === "TZD") {
        x = r.charAt(n) === "Z" ? -2 : 3
      } else {
        if (w === "s") {
          x = 2
        } else {
          x = 0
        }
      }
      v = r.substring(n, n + w.length + x);
      if (w === "TZD") {
        v = v === "Z" ? 0 : (v.slice(0, 1) === "-" ? 1000 : -1000) * (v.slice(1, 3) * 3600 + v.slice(4, 6) * 60)
      } else {
        v = Number.toInteger(v);
        if (w === "MM") {
          --v
        }
      }
      p[w] = v;
      t += x
    }
    var m = Object.mixin({YYYY: a.getFullYear(), MM: 0, DD: 1, hh: 0, mm: 0, ss: 0, s: 0, TZD: o ? 0 : i}, p);
    return new Date(Date.UTC(m.YYYY, m.MM, m.DD, m.hh, m.mm, m.ss, m.s) + m.TZD)
  };
  Date.prototype.format = function(s, p) {
    s = s || "YYYY-MM-DD";
    var m = p ? "getUTC" : "get";
    var t = this.getTimezoneOffset();
    var q = t < 0 ? "+" : "-";
    var r = (Math.floor(Math.abs(t) / 60)).padZero(2);
    var o = (Math.abs(t) - r * 60).padZero(2);
    var u = {YYYY: this[m + "FullYear"](), MM: (this[m + "Month"]() + 1).padZero(2), DD: this[m + "Date"]().padZero(2), hh: this[m + "Hours"]().padZero(2), mm: this[m + "Minutes"]().padZero(2), ss: this[m + "Seconds"]().padZero(2), s: this[m + "Milliseconds"]().padZero(3), TZD: (p || t === 0) ? "Z" : (q + r + ":" + o)};
    var n = s.replace(d, function(v) {
      return u[v]
    });
    return n
  };
  var j = /([.*+?^${}()|\[\]\/\\])/g;
  RegExp.escape = function(m) {
    return String(m).replace(j, "\\$1")
  }
})(window);
(function(b) {
  b.support = {touch: "ontouchend" in b, orientation: "orientation" in b && "onorientationchange" in b};
  Object.mixin(navigator, function() {
    var u = "Unknown";
    var w = "Unknown";
    var f = NaN;
    var v = navigator.userAgent;
    if (/Trident|MSIE/.test(v)) {
      u = "Trident"
    } else {
      if (/WebKit/.test(v)) {
        u = "WebKit"
      } else {
        if (/Gecko/.test(v)) {
          u = "Gecko"
        } else {
          if (/Presto/.test(v)) {
            u = "Presto"
          }
        }
      }
    }
    if (v.match(/(IE|Firefox|Chrome|Safari|Opera)(?: |\/)(\d+)/)) {
      w = RegExp.$1;
      f = Number.toInteger(RegExp.$2);
      if (v.match(/Version\/(\d+)/)) {
        f = Number.toInteger(RegExp.$1)
      }
    }
    var d = (navigator.language || navigator.userLanguage).toLowerCase();
    var p = document.compatMode === "CSS1Compat";
    if (!p) {
      console.warn("OurJS: Browser is working in non-standards mode!")
    }
    var k = false;
    var q = false;
    var l = false;
    var g = false;
    var m = false;
    var h = false;
    var n = false;
    var o = false;
    var i = false;
    var c = false;
    var s = false;
    var t = false;
    var j = document.documentElement;
    if ("ActiveXObject" in b) {
      if (p) {
        if ("WebSocket" in b) {
          k = true
        } else {
          if ("HTMLElement" in b) {
            l = true
          } else {
            if ("Element" in b) {
              m = true
            } else {
              if ("minWidth" in j.currentStyle) {
                n = true
              } else {
                o = true;
                try {
                  document.execCommand("BackgroundImageCache", false, true)
                } catch (r) {
                }
              }
            }
          }
        }
      }
      h = n || o;
      g = m || h;
      q = l || g
    } else {
      if ("uneval" in b) {
        i = true
      } else {
        if (getComputedStyle(j, null).getPropertyValue("-webkit-user-select")) {
          if ("chrome" in b) {
            c = true
          } else {
            s = true
          }
        } else {
          if ("opera" in b) {
            t = true
          }
        }
      }
    }
    return{userAgentInfo: {engine: u, name: w, version: f}, languageCode: d, inStandardsMode: p, isIE10: k, isIElt10: q, isIE9: l, isIElt9: g, isIE8: m, isIElt8: h, isIE7: n, isIE6: o, isFirefox: i, isChrome: c, isSafari: s, isOpera: t}
  }());
  location.parameters = Object.fromQueryString(location.search.slice(1), true);
  var a = b.cookie = {};
  a.getItem = function(d) {
    var c = document.cookie.match(new RegExp("(?:^|;)\\s*" + RegExp.escape(d) + "=([^;]*)"));
    return c ? decodeURIComponent(c[1]) : null
  };
  a.setItem = function(d, f, c) {
    c = c || {};
    var e = d + "=" + encodeURIComponent(f);
    if (c.path) {
      e += "; path=" + c.path
    }
    if (c.domain) {
      e += "; domain=" + c.domain
    }
    if (c.secure) {
      e += "; secure"
    }
    if (c.expires) {
      e += "; expires=" + (typeof c.expires === "string" ? Date.parseExact(c.expires, "YYYY-MM-DD hh:mm:ss") : c.expires).toUTCString()
    }
    document.cookie = e
  };
  a.removeItem = function(d, c) {
    c = c || {};
    c.expires = new Date(0);
    this.setItem(d, "", c)
  }
})(window);
(function(o) {
  var x = o.document;
  var z = x.documentElement;
  o.getClientSize = function() {
    return{width: z.clientWidth, height: z.clientHeight}
  };
  o.getScrollSize = function() {
    var H = x.body || {scrollWidth: 0, scrollHeight: 0};
    return{width: Math.max(z.scrollWidth, H.scrollWidth, z.clientWidth), height: Math.max(z.scrollHeight, H.scrollHeight, z.clientHeight)}
  };
  o.getPageOffset = function() {
    return{x: o.pageXOffset, y: o.pageYOffset}
  };
  var p = ["-o-", "-moz-", "-ms-", "-webkit-", ""];
  var h;
  o.getAvailableCSSPropertyName = function(I) {
    if (!h) {
      h = o.getComputedStyle(z, null)
    }
    var H = "";
    if (h) {
      var K = p.length;
      var J;
      while (K) {
        J = p[--K] + I;
        if (J.camelize(K < 2) in h) {
          H = J;
          break
        }
      }
    }
    return H
  };
  var g = function() {
    x.removeEventListener("DOMContentLoaded", g, false);
    x.fire("beforedomready");
    x.fire("domready");
    x.fire("afterdomready")
  };
  x.addEventListener("DOMContentLoaded", g, false);
  var t = /(?!<)\w*/;
  var r = {area: ["<map>", "</map>"], legend: ["<fieldset>", "</fieldset>"], optgroup: ["<select>", "</select>"], colgroup: ["<table><tbody></tbody>", "</table>"], col: ["<table><tbody></tbody><colgroup>", "</colgroup></table>"], tr: ["<table><tbody>", "</tbody></table>"], th: ["<table><tbody><tr>", "</tr></tbody></table>"]};
  r.option = r.optgroup;
  r.caption = r.thead = r.tfoot = r.tbody = r.colgroup;
  r.td = r.th;
  if (navigator.isIElt9) {
    r.link = r.style = r.script = ["#", ""]
  }
  var G = ["", ""];
  o.$ = x.$ = function(J) {
    var I = null;
    if (typeof J === "string") {
      if (J.charAt(0) === "<" && J.charAt(J.length - 1) === ">") {
        var H = t.exec(J)[0].toLowerCase();
        var K = r[H] || G;
        I = x.createElement("div");
        I.innerHTML = K[0] + J + K[1];
        while ((I = I.lastChild) && I.nodeName.toLowerCase() !== H) {
        }
        if (I && I.nodeType !== 1) {
          I = null
        }
      } else {
        I = x.querySelector(J)
      }
    } else {
      if (J && J.nodeType === 1) {
        I = J
      }
    }
    return I
  };
  x.find = function(H) {
    return this.querySelector(H)
  };
  x.findAll = function(H) {
    return Array.from(this.querySelectorAll(H))
  };
  var E;
  x.addStyleRules = function(I) {
    if (!E) {
      x.head.appendChild(x.createElement("style"));
      var H = x.styleSheets;
      E = H[H.length - 1]
    }
    I.forEach(function(J) {
      E.insertRule(J, E.cssRules.length)
    })
  };
  x.loadScript = function(J, I) {
    I = I || {};
    var H = x.head;
    var K = x.createElement("script");
    if (I.charset) {
      K.charset = I.charset
    }
    K.src = J;
    K.onload = K.onreadystatechange = function() {
      if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
        this.onload = this.onreadystatechange = null;
        H.removeChild(K);
        if (I.onLoad) {
          I.onLoad.call(this)
        }
      }
    };
    H.appendChild(K)
  };
  x.preloadImages = function(H, I) {
    H.forEach(function(J) {
      var K = new Image();
      if (I) {
        K.onload = function() {
          K.onload = null;
          I.call(K, {src: J})
        }
      }
      K.src = J
    })
  };
  if (!("innerText" in z)) {
    HTMLElement.prototype.__defineGetter__("innerText", function() {
      return this.textContent
    });
    HTMLElement.prototype.__defineSetter__("innerText", function(H) {
      this.textContent = H;
      return H
    })
  }
  if (!("outerText" in z)) {
    HTMLElement.prototype.__defineGetter__("outerText", function() {
      return this.textContent
    });
    HTMLElement.prototype.__defineSetter__("outerText", function(I) {
      var H = x.createTextNode(I);
      this.parentNode.replaceChild(H, this);
      return I
    })
  }
  if (!("insertAdjacentText" in z)) {
    HTMLElement.prototype.insertAdjacentText = function(H, I) {
      switch (H.toLowerCase()) {
        case"beforebegin":
        case"afterbegin":
        case"beforeend":
        case"afterend":
          this.insertAdjacentElement(H, x.createTextNode(I));
          break;
        default:
          throw new Error('Invalid position "' + H + '"')
      }
    }
  }
  if (!("insertAdjacentElement" in z)) {
    HTMLElement.prototype.insertAdjacentElement = function(I, H) {
      var J;
      switch (I.toLowerCase()) {
        case"beforebegin":
          if (J = this.parentNode) {
            J.insertBefore(H, this)
          }
          break;
        case"afterbegin":
          this.insertBefore(H, this.firstChild);
          break;
        case"beforeend":
          this.appendChild(H);
          break;
        case"afterend":
          if (J = this.parentNode) {
            J.insertBefore(H, this.nextSibling)
          }
          break;
        default:
          throw new Error('Invalid position "' + I + '"')
      }
      return H
    }
  }
  var w = /^(?:([[\w\*]+)|#([\w-]+)|\.([\w-]+))$/;
  Element.prototype.getParent = function() {
    return this.parentElement
  };
  Element.prototype.getPreviousSibling = function() {
    return this.previousElementSibling
  };
  Element.prototype.getNextSibling = function() {
    return this.nextElementSibling
  };
  Element.prototype.getFirstChild = function() {
    return this.firstElementChild
  };
  Element.prototype.getLastChild = function() {
    return this.lastElementChild
  };
  Element.prototype.getChildren = function() {
    return Array.from(this.children)
  };
  Element.prototype.getChildCount = function() {
    return this.childElementCount
  };
  Element.prototype.find = function(H) {
    var I;
    if (w.test(H)) {
      I = this.querySelector(H)
    } else {
      var J = this.id || (this.id = "__temporary__");
      I = this.querySelector("#" + J + " " + H);
      if (this.id === "__temporary__") {
        this.removeAttribute("id")
      }
    }
    return I
  };
  Element.prototype.findAll = function(I) {
    var H;
    if (w.test(I)) {
      H = this.querySelectorAll(I)
    } else {
      var J = this.id || (this.id = "__temporary__");
      H = this.querySelectorAll("#" + J + " " + I);
      if (this.id === "__temporary__") {
        this.removeAttribute("id")
      }
    }
    return Array.from(H)
  };
  var d = function() {
    var H = "";
    var J = ["matchesSelector", "msMatchesSelector", "webkitMatchesSelector", "mozMatchesSelector", "oMatchesSelector"];
    var I;
    while (I = J.shift()) {
      if (I in z) {
        H = I;
        break
      }
    }
    return H
  }();
  Element.prototype.matchesSelector = d ? function(H) {
    return this[d](H)
  } : function() {
    throw new TypeError('Unsupport method "matchesSelector"')
  };
  Element.prototype.clone = function(K, J) {
    var I = this.cloneNode(K);
    var H = [this];
    var L = [I];
    if (K) {
      H = H.concat(Array.from(this.getElementsByTagName("*")));
      L = L.concat(Array.from(I.getElementsByTagName("*")))
    }
    H.forEach(function(M, O) {
      var N = L[O];
      switch (N.nodeName) {
        case"INPUT":
        case"TEXTAREA":
          if (N.type === "radio" || N.type === "checkbox") {
            N.checked = N.defaultChecked = M.defaultChecked
          }
          N.value = N.defaultValue = M.defaultValue;
          break;
        case"OPTION":
          N.selected = N.defaultSelected = M.defaultSelected;
          break
      }
      if (J) {
        var P = M.eventHandlers;
        if (P) {
          Object.forEach(P, function(Q) {
            Q.forEach(function(R) {
              N.on(R.name, R.listener)
            })
          })
        }
      }
    });
    return I
  };
  Element.prototype.insertTo = function(I, H) {
    H = H || "beforeEnd";
    return I.insertAdjacentElement(H, this)
  };
  Element.prototype.swap = "swapNode" in z ? function(H) {
    return this.swapNode(H)
  } : function(H) {
    var K = H.parentElement;
    var J = this.parentElement;
    var I = this.nextSibling;
    if (K) {
      K.replaceChild(this, H)
    } else {
      this.remove(true)
    }
    if (J) {
      J.insertBefore(H, I)
    }
    return this
  };
  Element.prototype.replace = function(H, I) {
    var J = H.parentElement;
    if (J) {
      if (!I) {
        Array.from(A(H).getElementsByTagName("*")).forEach(A)
      }
      J.replaceChild(this, H)
    }
    return this
  };
  Element.prototype.remove = function(H) {
    var I = this.parentElement;
    if (I) {
      if (!H) {
        Array.from(A(this).getElementsByTagName("*")).forEach(A)
      }
      I.removeChild(this)
    }
    return this
  };
  Element.prototype.empty = function() {
    Array.from(this.getElementsByTagName("*")).forEach(A);
    while (this.firstChild) {
      this.removeChild(this.firstChild)
    }
    return this
  };
  Element.prototype.getClientRect = function() {
    return this.getBoundingClientRect()
  };
  Element.prototype.hasClass = function() {
    var H = this.classList;
    return Array.from(arguments).every(function(I) {
      return H.contains(I)
    })
  };
  Element.prototype.addClass = function() {
    var H = this.classList;
    Array.from(arguments).forEach(function(I) {
      H.add(I)
    });
    return this
  };
  Element.prototype.removeClass = function(H) {
    var I = this.classList;
    Array.from(arguments).forEach(function(J) {
      I.remove(J)
    });
    return this
  };
  Element.prototype.toggleClass = function(H) {
    var I = this.classList;
    Array.from(arguments).forEach(function(J) {
      I.toggle(J)
    });
    return this
  };
  var C = {"fill-opacity": true, "font-weight": true, "line-height": true, opacity: true, orphans: true, widows: true, "z-index": true, zoom: true};
  var F = {};
  ["user-select", "transform", "transform-origin", "backface-visibility", "perspective", "transition", "transition-property", "transition-duration", "transition-timing-function", "transition-delay"].forEach(function(H) {
    var I = o.getAvailableCSSPropertyName(H);
    if (I) {
      F[H] = I
    }
  });
  Element.prototype.getStyle = function(I) {
    I = I.dasherize();
    I = F[I] || I;
    var H = o.getComputedStyle(this, null);
    return H && H.getPropertyValue(I) || ""
  };
  Element.prototype.getStyles = function(H) {
    var I = {};
    H.forEach(function(J) {
      I[J] = this.getStyle(J)
    }, this);
    return I
  };
  Element.prototype.setStyle = function(I, H) {
    I = I.dasherize();
    I = F[I] || I;
    if (H === "") {
      this.style.removeProperty(I)
    } else {
      this.style.setProperty(I, Number.isFinite(H) && !C[I] ? H + "px" : H)
    }
    return this
  };
  Element.prototype.setStyles = function(H) {
    Object.forEach(H, function(I, J) {
      this.setStyle(J, I)
    }, this);
    return this
  };
  Element.prototype.reflow = function() {
    var H = this.offsetWidth;
    return this
  };
  var j = /^[a-z][a-zA-Z]*$/;
  var f = function(H) {
    return j.test(H) ? "data-" + H.dasherize() : ""
  };
  Element.prototype.getData = "dataset" in z ? function(H) {
    var I = this.dataset[H];
    return I === undefined ? null : I
  } : function(H) {
    H = f(H);
    var I = this.getAttribute(H);
    return typeof I === "string" ? I : null
  };
  Element.prototype.setData = function(H, I) {
    H = f(H);
    if (H) {
      this.setAttribute(H, String(I))
    }
    return this
  };
  Element.prototype.removeData = function(H) {
    H = f(H);
    if (H) {
      this.removeAttribute(H)
    }
    return this
  };
  var m = function(M) {
    var L = "";
    if (M.nodeType) {
      switch (M.type) {
        case"radio":
        case"checkbox":
          if (M.checked && !M.disabled) {
            L = M.value
          }
          break;
        case"select-one":
        case"select-multiple":
          if (!M.disabled) {
            var I = M.options;
            var J = 0;
            var K;
            if (M.type === "select-one") {
              var H = M.selectedIndex;
              if (navigator.isSafari && H === 0 && !I[0].hasAttribute("selected")) {
                while (K = I[++J]) {
                  if (!K.disabled && !K.parentNode.disabled) {
                    H = J;
                    break
                  }
                }
              }
              if (H >= 0 && !I[H].disabled) {
                L = I[H].value
              }
            } else {
              L = [];
              while (K = I[J++]) {
                if (K.selected && !K.disabled && !K.parentNode.disabled) {
                  L.push(K.value)
                }
              }
            }
          }
          break;
        default:
          if (!M.disabled) {
            L = M.value
          }
      }
    } else {
      L = [];
      Array.from(M).forEach(function(O) {
        var N = m(O);
        if (N) {
          L = L.concat(N)
        }
      })
    }
    return L
  };
  HTMLFormElement.prototype.getFieldValue = function(H) {
    var I = this.elements[H];
    if (!I) {
      throw new Error('Invalid field name "' + H + '"')
    }
    return m(I)
  };
  if (HTMLSelectElement.prototype.remove) {
    HTMLSelectElement.prototype.remove = Element.prototype.remove
  }
  HTMLSelectElement.prototype.insertOption = function(H, L, K, J, I) {
    this.options.add(new Option(L, K, J, I), H);
    return this
  };
  HTMLSelectElement.prototype.deleteOption = function(H) {
    var I = H > -1 ? this.options[H] : null;
    if (I) {
      I.remove()
    }
    return this
  };
  var u = {mousedown: 5, mouseup: 5, click: 5, dblclick: 5, contextmenu: 5, mousemove: 5, mouseover: 5, mouseout: 5, mouseenter: 1, mouseleave: 1, mousewheel: 5, mousedragstart: 5, mousedrag: 5, mousedragend: 5, mousedragenter: 5, mousedragleave: 5, mousedragover: 5, mousedrop: 5, keydown: 6, keypress: 6, keyup: 6, focus: 0, blur: 0, focusin: 4, focusout: 4, input: 4, change: 4, select: 0, cut: 4, copy: 4, paste: 4, submit: 0, reset: 0, scroll: 0, resize: 0, load: 0, unload: 0, error: 0, beforedomready: 0, domready: 0, afterdomready: 0, transitionend: 4, touchstart: 4, touchend: 4, touchmove: 4, touchcancel: 4, orientationchange: 0};
  var v = {mouseenter: true, mouseleave: true};
  var B = function() {
    return true
  };
  var n = function() {
    return false
  };
  var i = /\s*,\s*/;
  var b = /^([a-zA-Z]+)(?::relay\(([^\)]+)\))?(?::(once)|:idle\((\d+)\)|:throttle\((\d+)\))?(?:\.\w+)?$/;
  var q = /({)|}/g;
  var k = function(I) {
    var K = "";
    var M = 0;
    var J = 0;
    var L;
    while (L = I.charAt(J++)) {
      if (L === "{" || L === "}") {
        K = "";
        break
      }
      if (L === "(") {
        if (M > 0) {
          L = "{"
        }
        ++M
      } else {
        if (L === ")") {
          --M;
          if (M > 0) {
            L = "}"
          }
        }
      }
      K += L
    }
    var H = K.match(b);
    if (H === null) {
      throw new SyntaxError('Invalid listener name "' + I + '"')
    }
    return{type: H[1], selector: H[2] ? H[2].replace(q, function(O, N) {
      return N ? "(" : ")"
    }) : "", once: !!H[3], idle: parseInt(H[4], 10), throttle: parseInt(H[5], 10)}
  };
  var a = function(Q, L, H, K) {
    var R = L.slice(0);
    var N = L.delegateCount;
    var I = N ? H.target : Q;
    var J = {};
    var S;
    var M;
    var O;
    var P;
    do {
      if (I === Q) {
        O = N;
        P = R.length
      } else {
        O = 0;
        P = N
      }
      while (O < P) {
        S = R[O++];
        M = S.selector;
        if (!M || (J[M] || (J[M] = function(U) {
          if (U) {
            return function(X) {
              var V = U.tagName;
              var W = U.className;
              return(V ? X.nodeName.toUpperCase() === V : true) && (W ? X.hasClass(W) : true)
            }
          } else {
            var T = Q.findAll(M);
            return function(V) {
              return T.contains(V)
            }
          }
        }(S.simpleSelector)))(I)) {
          if (!K || K.call(I, H)) {
            if (S.listener.call(I, H) === false) {
              H.stopPropagation();
              H.preventDefault()
            }
            if (H.isImmediatePropagationStopped()) {
              break
            }
          }
        }
      }
    } while (!(I === Q || H.isPropagationStopped()) && (I = I === x && o || I === z && x || I.getParent()))
  };
  var A = function(K) {
    var J = K.eventHandlers;
    if (J) {
      var I = Object.keys(J);
      var H;
      while (I.length) {
        H = J[I.shift()];
        while (H.length) {
          K.off(H[0].name)
        }
      }
    }
    return K
  };
  var c = {};
  c.mousedragstart = c.mousedrag = c.mousedragend = function() {
    var H = ["mousedragstart", "mousedrag", "mousedragend"];
    var N = function(aa) {
      aa.preventDefault()
    };
    if ((navigator.isChrome || navigator.isSafari) && o !== top) {
      N.enabled = true
    }
    var I = o.support.touch;
    var M = NaN;
    var X = null;
    var V = 0;
    var U = 0;
    var Q = false;
    var Z = null;
    var J = null;
    var Y = {};
    var O = ["timeStamp", "ctrlKey", "altKey", "shiftKey", "metaKey", "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "leftButton", "middleButton", "rightButton", "which"];
    var S = function(aa) {
      O.forEach(function(ab) {
        if (aa[ab]) {
          Y[ab] = aa[ab]
        }
      })
    };
    var W = function(ac) {
      if (!X) {
        var ab = new y(ac.type, ac);
        if (I || ab.leftButton) {
          X = ab.target;
          if (X.setCapture) {
            X.setCapture()
          }
          if (N.enabled) {
            x.addEventListener("selectstart", N, false)
          } else {
            ab.preventDefault()
          }
          V = ab.pageX;
          U = ab.pageY;
          S(ab);
          Y.offsetX = Y.offsetY = 0;
          var aa = X.fire("mousedragstart", Y);
          Y.relatedTarget = aa.relatedTarget || null;
          Q = !!aa.aimRelatedTarget;
          setTimeout(function() {
            if (I) {
              x.addEventListener("touchmove", L, false);
              x.addEventListener("touchend", K, false);
              x.addEventListener("touchcancel", K, false)
            } else {
              x.addEventListener("mousemove", R, false);
              x.addEventListener("mousedown", T, false);
              x.addEventListener("mouseup", T, false)
            }
            o.addEventListener("blur", T, false)
          }, 0)
        }
      }
    };
    var R = function(ae) {
      var ab = new y(ae.type, ae);
      S(ab);
      Y.offsetX = ab.pageX - V;
      Y.offsetY = ab.pageY - U;
      X.fire("mousedrag", Y);
      var ai = ab.clientX;
      var ah = ab.clientY;
      var af = Y.relatedTarget;
      if (af) {
        if (Q) {
          var aa = af.getClientRect();
          ai = aa.left + Math.floor(aa.width / 2);
          ah = aa.top + Math.floor(aa.height / 2)
        }
        var ac = af.style;
        var ad = ac.left;
        var ag = ac.top;
        ac.left = "-50000px";
        ac.top = "0"
      }
      Z = x.elementFromPoint(ai, ah);
      if (af) {
        ac.left = ad;
        ac.top = ag
      }
      if (Z !== J) {
        if (J) {
          J.fire("mousedragleave", Y)
        }
        if (Z) {
          Z.fire("mousedragenter", Y)
        }
      }
      if (Z) {
        Z.fire("mousedragover", Y)
      }
      J = Z
    };
    var T = function(ab) {
      if (ab.type.startsWith("mouse")) {
        var aa = new y(ab.type, ab);
        S(aa)
      }
      Y.timeStamp = Date.now();
      if (Z) {
        Z.fire("mousedrop", Y)
      }
      X.fire("mousedragend", Y);
      if (X.releaseCapture) {
        X.releaseCapture()
      }
      if (N.enabled) {
        x.removeEventListener("selectstart", N, false)
      }
      X = Z = J = null;
      V = U = 0;
      Q = false;
      Y = {};
      if (I) {
        x.removeEventListener("touchmove", L, false);
        x.removeEventListener("touchend", K, false);
        x.removeEventListener("touchcancel", K, false)
      } else {
        x.removeEventListener("mousemove", R, false);
        x.removeEventListener("mousedown", T, false);
        x.removeEventListener("mouseup", T, false)
      }
      o.removeEventListener("blur", T, false)
    };
    var P = function(aa) {
      if (!M) {
        var ab = aa.changedTouches[0];
        M = ab.identifier;
        W(Object.mixin(ab, {type: "mousedown", preventDefault: function() {
          aa.preventDefault()
        }}))
      }
    };
    var L = function(aa) {
      var ab = null;
      Array.from(aa.changedTouches).some(function(ac) {
        if (ac.identifier === M) {
          ab = ac
        }
        return ab
      });
      if (ab) {
        R(Object.mixin(ab, {type: "mousemove"}))
      }
    };
    var K = function(aa) {
      var ab = null;
      Array.from(aa.changedTouches).some(function(ac) {
        if (ac.identifier === M) {
          M = NaN;
          ab = ac
        }
        return ab
      });
      if (ab) {
        T(Object.mixin(ab, {type: "mouseup"}))
      }
    };
    return{add: function(ab) {
      if (I) {
        ab.addEventListener("touchstart", P, false)
      } else {
        ab.addEventListener("mousedown", W, false)
      }
      var aa = ab.eventHandlers;
      H.forEach(function(ad) {
        if (!aa[ad]) {
          var ac = [];
          ac.delegateCount = 0;
          aa[ad] = ac
        }
      })
    }, remove: function(ac) {
      var ab = ac.eventHandlers;
      var aa = 0;
      H.forEach(function(ad) {
        aa += ab[ad].length
      });
      if (aa === 0) {
        if (I) {
          ac.removeEventListener("touchstart", P, false)
        } else {
          ac.removeEventListener("mousedown", W, false)
        }
        H.forEach(function(ad) {
          delete ab[ad]
        })
      }
      return false
    }}
  }();
  if (navigator.isFirefox) {
    Object.forEach({focusin: "focus", focusout: "blur"}, function(J, I) {
      var K = 0;
      var H = function(L) {
        L.target.fire(I)
      };
      c[I] = {add: function() {
        if (++K === 1) {
          x.addEventListener(J, H, true)
        }
      }, remove: function() {
        if (--K === 0) {
          x.removeEventListener(J, H, true)
        }
      }}
    })
  }
  if (navigator.isFirefox) {
    var e = function(H) {
      var J = H.nodeName;
      var I = H.type;
      return J === "TEXTAREA" || J === "INPUT" && (I === "text" || I === "password")
    };
    x.addEventListener("drop", function(I) {
      var H = I.target;
      if (e(H) && H !== x.activeElement) {
        setTimeout(function() {
          H.fire("change")
        }, 0)
      }
    }, false)
  }
  function y(H, L, J) {
    var I = u.hasOwnProperty(H) ? u[H] : 0;
    this.originalEvent = L;
    this.type = H;
    var K = L.target || x;
    if (K.nodeType === 3) {
      K = K.parentNode
    }
    this.target = K;
    this.timeStamp = L.timeStamp || Date.now();
    this.bubbles = !!(I & 4);
    if (L.type) {
      if (I & 3) {
        this.ctrlKey = L.ctrlKey;
        this.altKey = L.altKey;
        this.shiftKey = L.shiftKey;
        this.metaKey = L.metaKey;
        if (I & 1) {
          this.clientX = L.clientX;
          this.clientY = L.clientY;
          this.screenX = L.screenX;
          this.screenY = L.screenY;
          this.pageX = L.pageX;
          this.pageY = L.pageY;
          var M = L.which;
          this.leftButton = M === 1;
          this.middleButton = M === 2;
          this.rightButton = M === 3;
          this.which = M;
          this.relatedTarget = L.relatedTarget
        } else {
          this.which = L.which
        }
      }
    } else {
      if (J) {
        Object.mixin(this, J, {blackList: ["originalEvent", "type", "target"]})
      }
    }
  }

  Object.mixin(y.prototype, {stopPropagation: function() {
    var H = this.originalEvent;
    if (H) {
      H.stopPropagation()
    }
    this.isPropagationStopped = B
  }, isPropagationStopped: n, preventDefault: function() {
    var H = this.originalEvent;
    if (H) {
      H.preventDefault()
    }
    this.isDefaultPrevented = B
  }, isDefaultPrevented: n, stopImmediatePropagation: function() {
    this.stopPropagation();
    this.isImmediatePropagationStopped = B
  }, isImmediatePropagationStopped: n});
  var l = function() {
  };
  var D = /^(\w*)(?:\.([\w\-]+))?$/;
  var s = {transition: "transitionend", mstransition: "MSTransitionEnd", moztransition: "transitionend", webkittransition: "webkitTransitionEnd", otransition: "oTransitionEnd"}[getAvailableCSSPropertyName("transition").camelize().toLowerCase()];
  l.prototype.on = function(H, I) {
    var K = this;
    var J = K.eventHandlers || (K.eventHandlers = {});
    H.split(i).forEach(function(L) {
      var Q = k(L);
      var T = Q.type;
      var O = Q.selector;
      var M = Q.once;
      var P = Q.idle;
      var U = Q.throttle;
      var N = J[T] || (J[T] = []);
      if (!("delegateCount" in N)) {
        if (u.hasOwnProperty(T)) {
          if (c[T]) {
            c[T].add(K)
          } else {
            var S;
            switch (T) {
              case"mousewheel":
                S = function(Y) {
                  var X = new y(T, Y);
                  var W = "wheelDelta" in Y ? -Y.wheelDelta : Y.detail || 0;
                  X.wheelUp = W < 0;
                  X.wheelDown = W > 0;
                  a(K, N, X)
                };
                S.type = navigator.isFirefox ? "DOMMouseScroll" : "mousewheel";
                break;
              case"mouseenter":
              case"mouseleave":
                S = function(W) {
                  a(K, N, new y(T, W), function(Y) {
                    var X = Y.relatedTarget;
                    return !X || this.contains && !this.contains(X)
                  })
                };
                S.type = T === "mouseenter" ? "mouseover" : "mouseout";
                break;
              case"transitionend":
                S = function(X) {
                  var W = new y(T, X);
                  W.propertyName = X.propertyName;
                  a(K, N, W)
                };
                S.type = s;
                break;
              default:
                S = function(W) {
                  a(K, N, new y(T, W))
                };
                S.type = T
            }
            K.addEventListener(S.type, S, false);
            N.distributor = S
          }
        }
        N.delegateCount = 0
      }
      var V = {name: L};
      if (M) {
        V.listener = function(X) {
          var W = I.call(this, X);
          K.off(L);
          return W
        }
      } else {
        if (P) {
          V.listener = function() {
            var W;
            return function(Y) {
              var X = this;
              if (W) {
                clearTimeout(W)
              }
              W = setTimeout(function() {
                I.call(X, Y);
                W = undefined
              }, P)
            }
          }()
        } else {
          if (U) {
            V.listener = function() {
              var Z;
              var X;
              var W;
              var Y = 0;
              return function(ac) {
                X = this;
                W = ac;
                var aa = Date.now();
                var ab = aa - Y;
                if (!Z) {
                  Z = setTimeout(function() {
                    I.call(X, W);
                    Y = Date.now();
                    Z = undefined
                  }, ab < U ? U - ab : 0)
                }
              }
            }()
          } else {
            V.listener = I
          }
        }
      }
      if (O) {
        V.selector = O;
        var R;
        if (R = O.match(D)) {
          V.simpleSelector = {tagName: R[1].toUpperCase(), className: R[2] || ""}
        }
        N.splice(N.delegateCount++, 0, V)
      } else {
        N.push(V)
      }
    });
    return K
  };
  l.prototype.off = function(H) {
    var J = this;
    var I = J.eventHandlers;
    if (!I) {
      return J
    }
    H.split(i).forEach(function(L) {
      var O = k(L).type;
      var K = I[O];
      if (!K) {
        return
      }
      var M = 0;
      var N;
      while (M < K.length) {
        N = K[M];
        if (N.name === L) {
          K.splice(M, 1);
          if (N.selector) {
            K.delegateCount--
          }
        } else {
          M++
        }
      }
      if (K.length === 0) {
        if (u.hasOwnProperty(O)) {
          if (c[O]) {
            if (c[O].remove(J) === false) {
              return
            }
          } else {
            var P = K.distributor;
            J.removeEventListener(P.type, P, false)
          }
        }
        delete I[O]
      }
    });
    if (Object.keys(I).length === 0) {
      delete J.eventHandlers
    }
    return J
  };
  l.prototype.fire = function(I, K) {
    var J = new y(I, {type: "", target: this, stopPropagation: n, preventDefault: n}, K);
    var M = this;
    var L;
    var H;
    while (M) {
      if (H = (L = M.eventHandlers) && L[J.type]) {
        a(M, H, J)
      }
      if (!J.bubbles || J.isPropagationStopped() || M === o) {
        break
      }
      M = M === x && o || M === z && x || M.getParent()
    }
    return J
  };
  o.on = x.on = Element.prototype.on = l.prototype.on;
  o.off = x.off = Element.prototype.off = l.prototype.off;
  o.fire = x.fire = Element.prototype.fire = l.prototype.fire
})(window);
(function(d) {
  var f = /\s*,\s*/;
  var b = /^([a-zA-Z]+)(?:\.\w+)?$/;
  var a = function(h) {
    var g = h.match(b);
    if (g === null) {
      throw new SyntaxError('Invalid listener name "' + h + '"')
    }
    return g[1]
  };
  var e = function(g, i, h) {
    this.type = g;
    this.target = i;
    if (h) {
      Object.mixin(this, h, {blackList: ["type", "target"]})
    }
  };
  var c = d.JSEventTarget = function() {
    this.eventHandlers = {}
  };
  c.create = function(g) {
    this.call(g);
    Object.mixin(g, this.prototype);
    return g
  };
  c.prototype.on = function(g, h) {
    var i = this.eventHandlers;
    g.split(f).forEach(function(k) {
      var l = a(k);
      var j = i[l] || (i[l] = []);
      j.push({name: k, listener: h})
    });
    return this
  };
  c.prototype.off = function(g) {
    var h = this.eventHandlers;
    g.split(f).forEach(function(k) {
      var n = a(k);
      var j = h[n];
      if (j) {
        var l = 0;
        var m;
        while (l < j.length) {
          m = j[l];
          if (m.name === k) {
            j.splice(l, 1)
          } else {
            l++
          }
        }
        if (j.length === 0) {
          delete h[n]
        }
      }
    });
    return this
  };
  c.prototype.fire = function(h, j) {
    var i = new e(h, this, j);
    var g = this.eventHandlers[h];
    if (g) {
      g.slice(0).forEach(function(k) {
        k.listener.call(this, i)
      }, this)
    }
    return i
  }
})(window);
(function(C) {
  var y = {};
  var B = -2;
  var e = -1;
  var h = 0;
  var t = 1;
  var o = 2;
  var b = -1;
  var n = 0;
  var G = 1;
  var I = function(O, N, X, W) {
    var M = 0, V = 0, T = 0, Y = 0, U = 0, S = 0;
    var R = function(Z) {
      return((M * Z + V) * Z + T) * Z
    };
    var Q = function(Z) {
      return((Y * Z + U) * Z + S) * Z
    };
    var P = function(ab) {
      var af, ae, ac, Z, ad, aa;
      var ag = 0.001;
      for (ac = ab, aa = 0; aa < 8; aa++) {
        Z = R(ac) - ab;
        if (Math.abs(Z) < ag) {
          return ac
        }
        ad = (3 * M * ac + 2 * V) * ac + T;
        if (Math.abs(ad) < 0.000001) {
          break
        }
        ac = ac - Z / ad
      }
      af = 0;
      ae = 1;
      ac = ab;
      if (ac < af) {
        return af
      }
      if (ac > ae) {
        return ae
      }
      while (af < ae) {
        Z = R(ac);
        if (Math.abs(Z - ab) < ag) {
          return ac
        }
        if (ab > Z) {
          af = ac
        } else {
          ae = ac
        }
        ac = (ae - af) * 0.5 + af
      }
      return ac
    };
    T = 3 * O;
    V = 3 * (X - O) - T;
    M = 1 - T - V;
    S = 3 * N;
    U = 3 * (W - N) - S;
    Y = 1 - S - U;
    return function(Z) {
      return Q(P(Z))
    }
  };
  var w = {linear: function(M) {
    return M
  }, bounceIn: function(N) {
    N = 1 - N;
    var P;
    for (var O = 0, M = 1; 1; O += M, M /= 2) {
      if (N >= (7 - 4 * O) / 11) {
        P = M * M - Math.pow((11 - 6 * O - 11 * N) / 4, 2);
        break
      }
    }
    return 1 - P
  }, bounceOut: function(N) {
    var P;
    for (var O = 0, M = 1; 1; O += M, M /= 2) {
      if (N >= (7 - 4 * O) / 11) {
        P = M * M - Math.pow((11 - 6 * O - 11 * N) / 4, 2);
        break
      }
    }
    return P
  }, ease: I(0.25, 0.1, 0.25, 1), easeIn: I(0.42, 0, 1, 1), easeOut: I(0, 0, 0.58, 1), easeInOut: I(0.42, 0, 0.58, 1), easeOutIn: I(0, 0.42, 1, 0.58)};
  var H = function(M) {
    M = M || "";
    return w[M] || (M.startsWith("cubicBezier") ? I.apply(null, M.slice(12, -1).split(",").map(function(N) {
      return parseFloat(N)
    })) : w.ease)
  };
  var v = function(M, O, N) {
    M.clips.forEach(function(Q) {
      var S = false;
      var R = Q.duration;
      var P = (O - Q.delay) / Math.max(1, R);
      if (N) {
        if (Q.status === G) {
          return
        }
        if (Q.status === b) {
          if (P >= 0) {
            P = R ? 0 : 1;
            Q.status = n
          }
        }
        if (Q.status === n) {
          S = true;
          if (P >= 1) {
            P = 1;
            Q.status = G
          }
        }
      } else {
        if (Q.status === b) {
          return
        }
        if (Q.status === G) {
          if (P <= 1) {
            P = R ? 1 : 0;
            Q.status = n
          }
        }
        if (Q.status === n) {
          S = true;
          if (P <= 0) {
            P = 0;
            Q.status = b
          }
        }
      }
      if (S) {
        Q.call(M, P, P === 0 ? 0 : (P === 1 ? 1 : Q.timingFunction(P)))
      }
    });
    M.fire("step");
    if (N) {
      if (O === M.duration) {
        if (M.timestamp) {
          u(M)
        }
        M.status = o;
        M.fire("playfinish")
      }
    } else {
      if (O === 0) {
        if (M.timestamp) {
          u(M)
        }
        M.status = B;
        M.fire("reversefinish")
      }
    }
  };
  var f;
  var d = [];
  var E = function(M) {
    M.timestamp = Date.now();
    d.push(M);
    if (!f) {
      f = setInterval(function() {
        var N = Date.now();
        d.forEach(function(O) {
          var Q = O.status === t;
          var P = Math.limit(O.timePoint + (N - O.timestamp) * (Q ? 1 : -1), 0, O.duration);
          O.timestamp = N;
          O.timePoint = P;
          v(O, P, Q)
        });
        if (!d.length) {
          clearInterval(f);
          f = undefined
        }
      }, 1000 / Math.limit(m.fps, 10, 60))
    }
  };
  var u = function(M) {
    delete M.timestamp;
    d.remove(M)
  };
  var m = C.Animation = function() {
    this.clips = [];
    this.timePoint = 0;
    this.status = B;
    this.duration = 0;
    JSEventTarget.create(this)
  };
  m.fps = 60;
  m.prototype.addClip = function(O, M, P, N) {
    O.delay = M;
    O.duration = P;
    O.timingFunction = H(N);
    O.status = b;
    this.clips.push(O);
    this.duration = Math.max(this.duration, M + P);
    return this
  };
  m.prototype.play = function(N) {
    var O = this;
    var R = N !== y;
    var M = O.status;
    if (R && M !== t && M !== o || !R && M !== e && M !== B) {
      if (R) {
        O.status = t;
        O.fire("play");
        if (M === B && O.status === t) {
          O.fire("playstart")
        }
      } else {
        O.status = e;
        O.fire("reverse");
        if (M === o && O.status === e) {
          O.fire("reversestart")
        }
      }
      if (!O.timestamp && (O.status === t || O.status === e)) {
        var Q = O.timePoint;
        var P = O.duration;
        v(O, Q, R);
        if (R ? Q !== P : Q !== 0) {
          E(O)
        }
      }
      return true
    }
    return false
  };
  m.prototype.reverse = function() {
    return this.play(y)
  };
  m.prototype.pause = function() {
    var M = this;
    if (M.status === t || M.status === e) {
      if (M.timestamp) {
        u(M)
      }
      M.status = h;
      M.fire("pause");
      return true
    }
    return false
  };
  var p = 1;
  var F = 2;
  var q = 4;
  var L = {};
  var c = ["opacity"];
  var r = ["top", "right", "bottom", "left", "width", "height", "outlineWidth", "backgroundPositionX", "backgroundPositionY", "fontSize", "lineHeight", "letterSpacing", "wordSpacing", "textIndent"];
  r.push("margin", "padding", "borderWidth", "borderColor");
  var i = ["color", "backgroundColor", "outlineColor"];
  ["Top", "Right", "Bottom", "Left"].forEach(function(M) {
    r.push("margin" + M, "padding" + M, "border" + M + "Width");
    i.push("border" + M + "Color")
  });
  c.forEach(function(M) {
    L[M] = p
  });
  r.forEach(function(M) {
    L[M] = F
  });
  i.forEach(function(M) {
    L[M] = q
  });
  var A = function(N) {
    var M = parseFloat(N);
    return isFinite(M) ? M : 0
  };
  var z = {aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aqua: "#00FFFF", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000000", blanchedalmond: "#FFEBCD", blue: "#0000FF", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#00FFFF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgreen: "#006400", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8B", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", fuchsia: "#FF00FF", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", gray: "#808080", green: "#008000", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgreen: "#90EE90", lightgrey: "#D3D3D3", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#778899", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", lime: "#00FF00", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#FF00FF", maroon: "#800000", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", navy: "#000080", oldlace: "#FDF5E6", olive: "#808000", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", purple: "#800080", red: "#FF0000", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", silver: "#C0C0C0", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", teal: "#008080", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", white: "#FFFFFF", whitesmoke: "#F5F5F5", yellow: "#FFFF00", yellowgreen: "#9ACD32"};
  var D = /^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i;
  var l = /^#([\da-f])([\da-f])([\da-f])$/i;
  var j = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/;
  var k = function(O) {
    var N = [255, 255, 255];
    if (z.hasOwnProperty(O)) {
      O = z[O]
    }
    var M;
    if (M = O.match(D)) {
      N = Array.from(M).slice(1).map(function(P) {
        return parseInt(P, 16)
      })
    } else {
      if (M = O.match(l)) {
        N = Array.from(M).slice(1).map(function(P) {
          return parseInt(P + P, 16)
        })
      } else {
        if (M = O.match(j)) {
          N = Array.from(M).slice(1).map(function(P) {
            return +P
          })
        }
      }
    }
    return N
  };
  var g = /^[+\-]=\d+$/;
  var s = function(M, N) {
    return typeof N === "string" && g.test(N) ? M + (+(N.slice(0, 1) + "1") * N.slice(2)) : A(N)
  };
  var J = function(N, O) {
    var M = N.getStyles(Object.keys(O));
    var P = {before: {}, after: {}};
    Object.forEach(M, function(S, Q) {
      var R = O[Q];
      switch (L[Q]) {
        case p:
          P.before[Q] = A(S);
          P.after[Q] = A(R);
          break;
        case F:
          P.before[Q] = S = A(S);
          P.after[Q] = s(S, R);
          break;
        case q:
          P.before[Q] = k(S);
          P.after[Q] = k(R);
          break
      }
    });
    return P
  };
  m.createBasicRenderer = function(M) {
    M.type = "basic";
    return M
  };
  m.createStyleRenderer = function(N, O) {
    var M = document.$(N);
    var Q = J(M, O);
    var P = function(R, S) {
      Object.forEach(Q.before, function(W, T) {
        var U = Q.after[T];
        var V;
        switch (L[T]) {
          case p:
            V = (W + (U - W) * S).toFixed(2);
            break;
          case F:
            V = Math.floor(W + (U - W) * S) + "px";
            break;
          case q:
            V = "rgb(" + Math.floor(W[0] + (U[0] - W[0]) * S) + ", " + Math.floor(W[1] + (U[1] - W[1]) * S) + ", " + Math.floor(W[2] + (U[2] - W[2]) * S) + ")";
            break
        }
        M.setStyle(T, V)
      })
    };
    P.type = "style";
    return P
  };
  m.createScrollRenderer = function(O, T, S) {
    var W = document.$(O);
    var P;
    var V;
    var M = W === document.documentElement || W === document.body;
    if (M) {
      var U = C.getPageOffset();
      P = U.x;
      V = U.y
    } else {
      P = W.scrollLeft;
      V = W.scrollTop
    }
    var R = s(P, T) - P;
    var N = s(V, S) - V;
    var Q = function(X, aa) {
      var Z = Math.round(P + R * aa);
      var Y = Math.round(V + N * aa);
      if (M) {
        C.scrollTo(Z, Y)
      } else {
        W.scrollLeft = Z;
        W.scrollTop = Y
      }
    };
    Q.type = "scroll";
    return Q
  };
  var K = /\s*,\s*/;
  var a = function() {
  };
  var x = function(M) {
    return M._animations_ || (M._animations_ = {})
  };
  Element.prototype.morph = function(P, N) {
    var M = this;
    N = Object.mixin({duration: 400, timingFunction: "ease", onStart: a, onStep: a, onFinish: a}, N || {});
    var R = x(M);
    var Q = R.morph;
    if (Q) {
      Q.pause()
    }
    var O = R.morph = new m().addClip(m.createStyleRenderer(M, P), 0, N.duration, N.timingFunction).on("playstart", function(S) {
      N.onStart.call(M, S)
    }).on("step", function(S) {
      N.onStep.call(M, S)
    }).on("playfinish", function(S) {
      delete R.morph;
      N.onFinish.call(M, S)
    });
    O.play();
    return M
  };
  Element.prototype.highlight = function(O, S, P) {
    var M = this;
    O = O || "yellow";
    S = S || "backgroundColor";
    P = Object.mixin({duration: 500, timingFunction: "easeIn", onStart: a, onStep: a, onFinish: a}, P || {});
    var T = x(M);
    var R = T.highlight;
    if (R) {
      R.pause();
      M.setStyle(R.property, R.originalColor)
    }
    var Q = {};
    Q[S] = M.getStyle(S);
    var N = T.highlight = new m().on("playstart", function(U) {
      M.setStyle(S, O);
      this.addClip(m.createStyleRenderer(M, Q), 0, P.duration, P.timingFunction);
      P.onStart.call(M, U)
    }).on("step", function(U) {
      P.onStep.call(M, U)
    }).on("playfinish", function(U) {
      M.setStyle(this.property, this.originalColor);
      delete T.highlight;
      P.onFinish.call(M, U)
    });
    N.property = S;
    N.originalColor = M.style[S];
    N.play();
    return M
  };
  Element.prototype.fade = function(Q, V) {
    var S = this;
    var T = x(S);
    var N = T.fade;
    var P = N ? !N.isFadeInMode : S.getStyle("display") === "none";
    var U;
    switch ((Q || "toggle").toLowerCase()) {
      case"toggle":
        U = P;
        break;
      case"in":
        U = true;
        break;
      case"out":
        U = false;
        break;
      default:
        throw new Error('Invalid mode "' + Q + '"')
    }
    if (N || U === P) {
      V = Object.mixin({duration: 200, timingFunction: "easeIn", onStart: a, onStep: a, onFinish: a}, V || {});
      var M;
      var R;
      if (N) {
        M = N.originalOpacity;
        R = Math.abs((U === N.isFadeInMode ? 0 : 1) - N.percentageNeedsPlay * (1 - (N.timePoint / N.duration)));
        N.pause()
      } else {
        M = S.getStyle("opacity");
        R = 1;
        if (U) {
          S.setStyles({display: "block", opacity: 0})
        }
      }
      var O = T.fade = new m().addClip(m.createStyleRenderer(S, {opacity: U ? M : 0}), 0, V.duration * R, V.timingFunction).on("playstart", function(W) {
        V.onStart.call(S, W)
      }).on("step", function(W) {
        V.onStep.call(S, W)
      }).on("playfinish", function(W) {
        delete T.fade;
        if (!U) {
          S.setStyles({display: "none", opacity: M})
        }
        V.onFinish.call(S, W)
      });
      O.isFadeInMode = U;
      O.originalOpacity = M;
      O.percentageNeedsPlay = R;
      O.play()
    }
    return S
  };
  Element.prototype.smoothScroll = function(N, S, P) {
    var O = this;
    P = Object.mixin({duration: 200, timingFunction: "easeInOut", onStart: a, onStep: a, onFinish: a}, P || {});
    var R = x(O);
    var Q = R.smoothScroll;
    if (Q) {
      Q.pause()
    }
    var M = R.smoothScroll = new m().addClip(m.createScrollRenderer(O, N, S), 0, P.duration, P.timingFunction).on("playstart", function(T) {
      P.onStart.call(O, T)
    }).on("step", function(T) {
      P.onStep.call(O, T)
    }).on("playfinish", function(T) {
      delete R.smoothScroll;
      P.onFinish.call(O, T)
    });
    M.play();
    return O
  };
  Element.prototype.cancelAnimation = function(O) {
    var M = this;
    var P = x(M);
    var N = O ? O.split(K) : null;
    Object.forEach(P, function(R, Q) {
      if (N === null || N.contains(Q)) {
        R.pause();
        delete P[Q];
        switch (Q) {
          case"morph":
            break;
          case"highlight":
            M.setStyle(R.property, R.originalColor);
            break;
          case"fade":
            M.setStyles({display: R.isFadeInMode ? "block" : "none", opacity: R.originalOpacity});
            break;
          case"smoothScroll":
            break
        }
      }
    });
    return M
  }
})(window);
(function(l) {
  var g = 0;
  var e = -498;
  var f = -408;
  var i = Date.now();
  var h = function() {
  };
  var j = [];
  if (l.ActiveXObject) {
    l.on("unload", function() {
      j.forEach(function(n) {
        n.abort()
      })
    })
  }
  var k = function() {
    try {
      var o = l.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")
    } catch (n) {
      throw new Error("Can not create XHR Object")
    }
    return o
  };
  var c = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg;
  var d = function(p) {
    var o = {};
    var n;
    while (n = c.exec(p)) {
      o[n[1]] = n[2]
    }
    return o
  };
  var b = function(n) {
    if (!n.sync && Number.isFinite(n.minTime)) {
      var o = n.minTime - (Date.now() - n.timestamp);
      if (o > 0) {
        n.minTimeTimer = setTimeout(function() {
          m(n, g)
        }, o);
        return
      }
    }
    m(n, g)
  };
  var m = function(o, p) {
    if (o.minTimeTimer) {
      p = g;
      clearTimeout(o.minTimeTimer);
      delete o.minTimeTimer
    }
    if (o.maxTimeTimer) {
      clearTimeout(o.maxTimeTimer);
      delete o.maxTimeTimer
    }
    o.ongoing = false;
    delete o.timestamp;
    var n = {status: 0, statusText: ""};
    switch (o.mode) {
      case"xhr":
        n.headers = {};
        n.text = "";
        n.xml = null;
        var s = o.xhr;
        delete o.xhr;
        s.onreadystatechange = h;
        if (p === g) {
          try {
            n.status = s.status;
            if (n.status === 1223) {
              n.status = 204
            }
            n.statusText = s.statusText;
            n.headers = d(s.getAllResponseHeaders());
            n.text = s.responseText;
            if (s.responseXML && s.responseXML.documentElement) {
              n.xml = s.responseXML
            }
          } catch (r) {
          }
        } else {
          s.abort()
        }
        j.remove(o);
        break;
      case"jsonp":
        n.data = null;
        if (p === g) {
          n.status = g;
          n.statusText = "OK";
          n.data = o.receivedData
        } else {
          var q = o.id;
          a[q] = function() {
            delete a[q]
          }
        }
        break
    }
    switch (p) {
      case g:
        o.fire("complete", n);
        break;
      case e:
        n.status = e;
        n.statusText = "Aborted";
        o.fire("abort", n);
        break;
      case f:
        n.status = f;
        n.statusText = "Timeout";
        o.fire("timeout", n);
        break
    }
    o.fire("finish", n)
  };
  var a = l.Request = function(o, n) {
    this.url = o;
    n = Object.mixin(Object.clone(a.options, true), n || {});
    switch (n.mode = n.mode.toLowerCase()) {
      case"xhr":
        n.method = n.method.toLowerCase();
        Object.mixin(this, n, {whiteList: ["mode", "method", "noCache", "sync", "minTime", "maxTime", "username", "password", "headers", "contentType"]});
        break;
      case"jsonp":
        n.method = "get";
        n.noCache = true;
        n.sync = false;
        Object.mixin(this, n, {whiteList: ["mode", "method", "noCache", "sync", "minTime", "maxTime", "callbackName"]});
        break
    }
    this.ongoing = false;
    JSEventTarget.create(this)
  };
  a.options = {mode: "xhr", method: "get", noCache: false, sync: false, minTime: NaN, maxTime: NaN, username: "", password: "", headers: {Accept: "*/*"}, contentType: "application/x-www-form-urlencoded", callbackName: "callback"};
  a.prototype.send = function(o) {
    var p = this;
    if (!p.ongoing) {
      p.ongoing = true;
      p.timestamp = Date.now();
      p.fire("start");
      o = o ? Object.toQueryString(o) : null;
      var n = p.url;
      var t = p.method;
      if (t === "get" && o) {
        n += (n.contains("?") ? "&" : "?") + o;
        o = null
      }
      var s = p.sync;
      switch (p.mode) {
        case"xhr":
          if (p.noCache) {
            n += (n.contains("?") ? "&" : "?") + "_=" + (++i).toString(36)
          }
          var r = p.xhr = k();
          r.open(t, n, !s, p.username, p.password);
          Object.forEach(p.headers, function(v, u) {
            r.setRequestHeader(u, v)
          });
          if (t === "post") {
            r.setRequestHeader("Content-Type", p.contentType)
          }
          r.send(o);
          j.push(p);
          if (s || r.readyState === 4) {
            b(p)
          } else {
            r.onreadystatechange = function() {
              if (r.readyState === 4) {
                b(p)
              }
            }
          }
          break;
        case"jsonp":
          var q = "_" + (++i).toString(36);
          n += (n.contains("?") ? "&" : "?") + p.callbackName + "=Request." + q;
          a[p.id = q] = function(u) {
            delete a[q];
            p.receivedData = u;
            b(p)
          };
          document.loadScript(n);
          break
      }
      if (!s && Number.isFinite(p.maxTime)) {
        p.maxTimeTimer = setTimeout(function() {
          m(p, f)
        }, Math.max(0, p.maxTime))
      }
      return true
    }
    return false
  };
  a.prototype.abort = function() {
    if (this.ongoing) {
      m(this, e);
      return true
    }
    return false
  }
})(window);
(function(c) {
  var a = {};
  var b = c.Widget = {};
  b.register = function(e) {
    if (e.styleRules) {
      document.addStyleRules(e.styleRules)
    }
    a[e.type] = {selector: e.selector, nodeName: e.selector.substring(0, e.selector.indexOf(".")).toUpperCase(), parse: function(f) {
      if (e.config) {
        Object.forEach(e.config, function(g, i) {
          var j = g;
          var h = f.getData(i);
          if (h !== null) {
            switch (typeof g) {
              case"string":
                j = h;
                break;
              case"boolean":
                j = true;
                break;
              case"number":
                j = parseFloat(h);
                break;
              default:
                throw new Error('Invalid config type "' + i + '"')
            }
          }
          f[i] = j
        })
      }
      if (e.methods) {
        Object.mixin(f, e.methods)
      }
      if (e.initialize) {
        e.initialize.call(f)
      }
      f.widgetType = e.type
    }}
  };
  var d = /\bwidget-([a-z][a-z0-9-]*)\b/;
  b.parse = function(g, h) {
    var e = document.$(g);
    if (!e.widgetType) {
      var f = e.className.match(d);
      if (f) {
        b.parseAs(e, f[1])
      }
    }
    if (h) {
      e.findAll("[class*=widget-]").forEach(function(i) {
        b.parse(i)
      })
    }
  };
  b.parseAs = function(f, g) {
    var e = document.$(f);
    var h = a[g];
    if (h && h.parse) {
      if (e.nodeName === h.nodeName) {
        h.parse(e)
      } else {
        console.warn('OurJS: Widget "' + g + '" can not be applied on ' + e.nodeName + " elements.")
      }
    } else {
      console.warn('OurJS: Widget parser "' + g + '" is not found.')
    }
  };
  document.on("beforedomready", function() {
    b.parse(document.body, true)
  })
})(window);
